/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controllers;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import model.dao.AccountFacadeLocal;
import model.dao.AccountGroupFacadeLocal;
import model.entities.Account;
import model.entities.AccountGroup;

/**
 *
 * @author NgocNH
 */
@ManagedBean
@RequestScoped
public class permission {
    @EJB
    private AccountFacadeLocal accountFacade;
    @EJB
    private AccountGroupFacadeLocal accountGroupFacade;
    
    private Account acc;
    private AccountGroup accGroup;
    
    public String[] permissions;

    /** Creates a new instance of permission */
    public permission() {
    }
    
    public String getPerms() {
        acc = new Account();
        acc = accountFacade.find(1);
        return acc.getGroupId().getPermission();
    }
}
